﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="dictprojecttype.aspx.cs" Inherits="Basic_dictprojecttype" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>项目类别字典</title>
   	<link rel="stylesheet" type="text/css" href="../CSS/Style.css"/>
    <script type="text/javascript" src="../js/jquery-1.4.2.min.js"></script>	
    <script type="text/javascript" src="../js/artDialog/artDialog.min.js"></script>
    <script type="text/javascript">
    function geturl(target){
	var url=$(target).attr("href");
	showdialog(url);
	return false;
	}
    function showdialog1(tar){
         art.dialog.open(tar,{id:"iframechange" ,title:"更换图片",skin:"aero",lock:true});
    }
    </script> 
    <style type="text/css">
        .style1
        {
            width: 22px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
               <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager> 
    <div>
         <div style="background: #FFFCC9;border: 1px solid #FFD667; ">
             <table cellpadding="0" cellspacing="0" style="width:100%">
             <tr><td class="style1"><img id="Img1"  src="../Images/Warning.png" alt="提示" /></td>
             <td>警告：此为控制主页的项目显示，请不要任意删除，更换申报模板时请先看清模板功能。</td>
             <td style="text-align:right;"><a href="../Web/viewinfo.aspx" target="mainwin" /><img style="border:0;" src="../Images/GetBack.png" title="返回上级" alt="返回上级" /></td></tr>
             </table>
         </div> 
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
           <div>
          <webdiyer:AspNetPager ID="AspNetPager1" runat="server" AlwaysShow="True" FirstPageText="首页"
                        HorizontalAlign="Right" LastPageText="末页" NextPageText="下一页" 
                        PageIndexBoxType="TextBox" PageSize="15" PrevPageText="上一页" ShowCustomInfoSection="Left"
                        ShowPageIndexBox="Always" Width="100%" CustomInfoHTML="共<font color=blue><b>%RecordCount%</b></font>条数据 每页：<font color=blue><b>%PageSize%</b></font> 条 共<font color=blue><b>%PageCount%</b></font>页 当前页：<font color=red><b>%CurrentPageIndex%/%PageCount%</b></font>" OnPageChanged="AspNetPager1_PageChanged" CustomInfoSectionWidth="50%" SubmitButtonText="Go" TextAfterPageIndexBox="页" TextBeforePageIndexBox="转到" CustomInfoTextAlign="Left">
                    </webdiyer:AspNetPager></div> 
                   <div>
                <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                           CssClass="gvStyle" AlternatingRowStyle-CssClass="alt" PagerStyle-CssClass="pgr" 
                           EmptyDataText="暂时无任何数据！" Width="100%" DataKeyNames="id" 
                           onrowcancelingedit="GridView1_RowCancelingEdit" 
                           onrowcommand="GridView1_RowCommand1" onrowediting="GridView1_RowEditing" 
                           onrowupdating="GridView1_RowUpdating">
                    <Columns>
                        <asp:TemplateField HeaderText="序号">   <ItemTemplate> 
                                 <%# (this.AspNetPager1.CurrentPageIndex - 1) * this.AspNetPager1.PageSize + Container.DataItemIndex + 1%>
                            </ItemTemplate> 
                            <ItemStyle Width="30px" />
                        </asp:TemplateField>
                        <asp:BoundField DataField="btnname" HeaderText="项目类别" ReadOnly="True" />
                        <asp:TemplateField HeaderText="标记">
                            <ItemTemplate>
                               <%# strImageUrl(Convert.ToString(Eval("btnurl0")), Convert.ToString(Eval("btnurl1")))%> 
                            </ItemTemplate>
                            <ItemStyle Width="100px" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="当前状态">
                            <ItemTemplate>
                               <%# (bool)(Convert.ToString(Eval("btnstate"))=="on")?"点亮":"熄灭"%> 
                            </ItemTemplate>
                            <ItemStyle Width="100px" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="申报模板">
                          <ItemTemplate>
                             <%# Eval("tempname")%> 
                          </ItemTemplate>
                            <EditItemTemplate>
                                <asp:DropDownList ID="DropDownList1" runat="server" DataTextField="tempname" 
                                    DataValueField="id">
                                </asp:DropDownList>
                            </EditItemTemplate>
                            <ItemStyle Width="120px" />
                        </asp:TemplateField>
                        <asp:CommandField ShowEditButton="True" EditText="更换模板" UpdateText="确定" >
                            <ItemStyle Width="100px" />
                        </asp:CommandField>
                        <asp:TemplateField HeaderText="操作" >
                            <ItemTemplate>
                           <a>更换图片</a>|
                                <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/js/themes/icons/cancel.png"
                                    ToolTip=" 警告：勿随便删除！" CommandArgument='<%# Eval("id") %>' 
                                    CommandName="delete" 
                                    onclientclick="return confirm(&quot;删除此类别将删除其他一切与此类别相关的数据，您确定要删除此类别吗？&quot;);" />
                            </ItemTemplate>
                            <ItemStyle Width="90px" />
                        </asp:TemplateField>
                    </Columns>
                    <PagerStyle CssClass="pgr" />
                    <AlternatingRowStyle CssClass="alt" />
                </asp:GridView>
                </div> 
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
    </form>
</body>
</html>